## ─ Session info ───────────────────────────────────────────────────────────────
## setting value
## version R version 3.6.1 (2019-07-05)
## os macOS 10.16
## system x86_64, darwin15.6.0
## ui X11
## language (EN)
## collate en_US.UTF-8
## ctype en_US.UTF-8
## tz Europe/London
## date 2022-05-30
##
## ─ Packages ───────────────────────────────────────────────────────────────────
## package * version date lib source
## assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.0)
## backports 1.2.1 2020-12-09 [1] CRAN (R 3.6.2)
## broom 0.7.6 2021-04-05 [1] CRAN (R 3.6.2)
## bslib 0.2.4 2021-01-25 [1] CRAN (R 3.6.2)
## cellranger 1.1.0 2016-07-27 [1] CRAN (R 3.6.0)
## circlize * 0.4.12 2021-01-08 [1] CRAN (R 3.6.2)
## cli 2.4.0 2021-04-05 [1] CRAN (R 3.6.2)
## colorspace 2.0-0 2020-11-11 [1] CRAN (R 3.6.2)
## cowplot * 1.1.1 2020-12-30 [1] CRAN (R 3.6.2)
## crayon 1.4.1 2021-02-08 [1] CRAN (R 3.6.2)
## data.table * 1.14.2 2021-09-27 [1] CRAN (R 3.6.2)
## DBI 1.1.1 2021-01-15 [1] CRAN (R 3.6.2)
## dbplyr 2.1.1 2021-04-06 [1] CRAN (R 3.6.2)
## digest 0.6.27 2020-10-24 [1] CRAN (R 3.6.2)
## dplyr * 1.0.5 2021-03-05 [1] CRAN (R 3.6.2)
## ellipsis 0.3.1 2020-05-15 [1] CRAN (R 3.6.2)
## evaluate 0.14 2019-05-28 [1] CRAN (R 3.6.0)
## fansi 0.4.2 2021-01-15 [1] CRAN (R 3.6.2)
## forcats * 0.5.1 2021-01-27 [1] CRAN (R 3.6.2)
## fs * 1.5.0 2020-07-31 [1] CRAN (R 3.6.2)
## generics 0.1.0 2020-10-31 [1] CRAN (R 3.6.2)
## ggplot2 * 3.3.5 2021-06-25 [1] CRAN (R 3.6.2)
## GlobalOptions 0.1.2 2020-06-10 [1] CRAN (R 3.6.2)
## glue 1.4.2 2020-08-27 [1] CRAN (R 3.6.2)
## gridExtra * 2.3 2017-09-09 [1] CRAN (R 3.6.0)
## gtable 0.3.0 2019-03-25 [1] CRAN (R 3.6.0)
## haven 2.4.1 2021-04-23 [1] CRAN (R 3.6.2)
## hms 1.0.0 2021-01-13 [1] CRAN (R 3.6.2)
## htmltools 0.5.1.1 2021-01-22 [1] CRAN (R 3.6.2)
## httr 1.4.2 2020-07-20 [1] CRAN (R 3.6.2)
## jquerylib 0.1.3 2020-12-17 [1] CRAN (R 3.6.2)
## jsonlite 1.7.2 2020-12-09 [1] CRAN (R 3.6.2)
## knitr 1.33 2021-04-24 [1] CRAN (R 3.6.2)
## lifecycle 1.0.0 2021-02-15 [1] CRAN (R 3.6.2)
## lubridate 1.7.10 2021-02-26 [1] CRAN (R 3.6.2)
## magrittr * 2.0.1 2020-11-17 [1] CRAN (R 3.6.2)
## modelr 0.1.8 2020-05-19 [1] CRAN (R 3.6.2)
## munsell 0.5.0 2018-06-12 [1] CRAN (R 3.6.0)
## pillar 1.6.0 2021-04-13 [1] CRAN (R 3.6.2)
## pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 3.6.0)
## PNWColors * 0.1.0 2020-06-12 [1] CRAN (R 3.6.2)
## purrr * 0.3.4 2020-04-17 [1] CRAN (R 3.6.2)
## R6 2.5.0 2020-10-28 [1] CRAN (R 3.6.2)
## Rcpp 1.0.6 2021-01-15 [1] CRAN (R 3.6.2)
## readr * 1.4.0 2020-10-05 [1] CRAN (R 3.6.2)
## readxl 1.3.1 2019-03-13 [1] CRAN (R 3.6.0)
## reprex 2.0.0 2021-04-02 [1] CRAN (R 3.6.2)
## rlang 0.4.10 2020-12-30 [1] CRAN (R 3.6.2)
## rmarkdown 2.7 2021-02-19 [1] CRAN (R 3.6.2)
## rstudioapi 0.13 2020-11-12 [1] CRAN (R 3.6.2)
## rvest 1.0.0 2021-03-09 [1] CRAN (R 3.6.1)
## sass 0.3.1 2021-01-24 [1] CRAN (R 3.6.2)
## scales 1.1.1 2020-05-11 [1] CRAN (R 3.6.2)
## sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.6.0)
## shape 1.4.5 2020-09-13 [1] CRAN (R 3.6.2)
## stringi 1.5.3 2020-09-09 [1] CRAN (R 3.6.2)
## stringr * 1.4.0 2019-02-10 [1] CRAN (R 3.6.0)
## tibble * 3.1.1 2021-04-18 [1] CRAN (R 3.6.2)
## tidyr * 1.1.3 2021-03-03 [1] CRAN (R 3.6.2)
## tidyselect 1.1.0 2020-05-11 [1] CRAN (R 3.6.2)
## tidyverse * 1.3.1 2021-04-15 [1] CRAN (R 3.6.1)
## utf8 1.2.1 2021-03-12 [1] CRAN (R 3.6.2)
## vctrs 0.3.7 2021-03-29 [1] CRAN (R 3.6.2)
## viridis * 0.6.0 2021-04-15 [1] CRAN (R 3.6.2)
## viridisLite * 0.4.0 2021-04-13 [1] CRAN (R 3.6.2)
## withr 2.4.2 2021-04-18 [1] CRAN (R 3.6.2)
## xfun 0.22 2021-03-11 [1] CRAN (R 3.6.2)
## xml2 1.3.2 2020-04-23 [1] CRAN (R 3.6.2)
## yaml 2.2.1 2020-02-01 [1] CRAN (R 3.6.0)
##
## [1] /Library/Frameworks/R.framework/Versions/3.6/Resources/library
--extract function)## Read in treated/untreated plasma digests
deglyco.raw <- rbind(dir_ls(raw.data.dir, regexp = "untreated") %>% ## No glycosidase treatment
fread() %>%
mutate(Exp = "- Glycosidase"), ## Add experiment condition
dir_ls(raw.data.dir, regexp = "16h") %>% ## + Glycosidase treatment
fread() %>%
mutate(Exp = "+ Glycosidase")) ## Add experiment condition
## Format longer, remove zero values, scale and add labels by each ion
deglyco <- deglyco.raw %>%
mutate(mz = ((Window.Low+Window.High)/2)) %>% ## Use middle of each m/z bin for precursor m/z plotting
select(c('RT', 'mz', 'Exp', '204.087', '366.14', '274.092')) %>%
pivot_longer(cols = 4:6,
names_to = "Ion",
values_to = "Intensity") %>% ## Make 'long' table
filter(Intensity != "0") %>% ## Remove 0 values
group_by(Ion) %>% ## Scale intensity across control/deglycosidase experiments by each ion
mutate(Scaled.Intensity = Intensity/max(Intensity)) %>%
ungroup() %>%
mutate(Ion.Label = ifelse(Ion == 274.092, ## Add labels describing oxonium ion (i.e. sugar monomer they derive from)
yes = "NeuAc",
no = ifelse(Ion == 204.087,
yes = "HexNAc",
no = "Hex+HexNAc")),
Exp = factor(Exp, levels = c("- Glycosidase", "+ Glycosidase"))) ## As factor for plotting
## Just show oxonium ion map for 204
deglyco %>%
filter(Ion == 204.087,
Exp == "- Glycosidase") %>%
ggplot(aes(x = RT,
y = mz)) +
geom_point(aes(alpha = 4*Scaled.Intensity),
size = 0.4,
shape = 15) +
theme_linedraw() +
theme(strip.background = element_blank(),
strip.text = element_text(colour = "black", face = "bold", size = 14),
panel.grid = element_blank(),
strip.text.x = element_text(hjust = -0.01),
axis.title = element_text(size = 13),
plot.margin = unit(c(1, 1, 1, 1), "cm"),
) +
scale_alpha_identity() +
scale_y_continuous(expand = expand_scale(mult = c(0, 0)),
limits = c(999,1501),
breaks = seq(1000,1500,by=100)) +
scale_x_continuous(expand = expand_scale(mult = c(0, 0)),
limits = c(5,45)) +
ylab("Precursor m/z") +
xlab("Retention Time")
## Format longer, remove zero values, scale and add labels by each ion
deglyco.all <- deglyco.raw %>%
filter(Exp == "- Glycosidase") %>%
mutate(mz = ((Window.Low+Window.High)/2),
.keep = "unused",
.before = 1) %>% ## Use middle of each m/z bin for precursor m/z plotting
pivot_longer(cols = 3:11,
names_to = "Ion",
values_to = "Intensity") %>% ## Make 'long' table
filter(Intensity != "0") %>% ## Remove 0 values
group_by(Ion) %>% ## Scale intensity across control/deglycosidase experiments by each ion
mutate(Scaled.Intensity = Intensity/max(Intensity)) %>%
ungroup()
## Plot faceted for each ion
deglyco.all %>%
ggplot(aes(x = RT,
y = mz)) +
geom_point(aes(alpha = 4*Scaled.Intensity),
size = 0.4,
shape = 15) +
theme_linedraw() +
theme(strip.background = element_blank(),
strip.text = element_text(colour = "black", face = "bold", size = 12, hjust = -0.01),
axis.title = element_text(size = 13),
panel.grid = element_blank(),
plot.margin = unit(c(1, 1, 1, 1), "cm"),
) +
scale_alpha_identity() +
scale_y_continuous(expand = expand_scale(mult = c(0, 0)),
limits = c(999,1501),
breaks = seq(1000,1500,by=100)) +
scale_x_continuous(expand = expand_scale(mult = c(0, 0)),
limits = c(5,45)) +
ylab("Precursor m/z") +
xlab("Retention Time") +
facet_wrap(~paste("m/z", Ion), ncol = 3)
#ggsave("~/Desktop/AllIons.png", height = 10, width = 12.5)